﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.WindowsAzure.StorageClient;
using System.ComponentModel.DataAnnotations;
using PC.AzureMultiApp.Core;

namespace PC.AzureMultiApp.Core.Models
{
    public class ApplicationModel
    {
        /// <summary>
        /// UniqueId
        /// </summary>
        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "UniqueId")]
        public string UniqueId { get; set; }

        /// <summary>
        /// Customer Unique Identifier
        /// </summary>
        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "Name")]
        [StringLength(20, ErrorMessage = "Value must be between 3 and 20 characters", MinimumLength = 3)]
        public string Name { get; set; }

        /// <summary>
        /// This value represent the IIS aplication name that will be contain application
        /// </summary>
        [Required]
        [DataType(DataType.Text)]
        [Display(Name = "IIS App")]
        [StringLength(20, ErrorMessage = "Value must be between 3 and 20 characters", MinimumLength = 3)]
        public string ApplicationName { get; set; }

        [DataType(DataType.Url)]
        [Display(Name = "Application Url")]
        public string ApplicationUrl { get; set; }

        /// <summary>
        /// Url to Blob that has files. Zip file.
        /// </summary>
        [Required]
        [DataType(DataType.Url)]
        [Display(Name = "Blob Url")]
        [StringLength(500, ErrorMessage = "Must be under 500 characteres")]
        public string BlobUrl { get; set; }

        [DataType(DataType.Text)]
        [Display(Name = "Version")]
        [StringLength(100, ErrorMessage = "Must be under 100 characteres")]
        public string Version { get; set; }

        [DataType(DataType.Text)]
        [Display(Name = "Label")]
        [StringLength(100, ErrorMessage = "Must be under 100 characteres")]
        public string Label { get; set; }

        [DataType(DataType.Text)]
        [Display(Name = "Status")]
        public string Status { get; set; }

        [Display(Name = "Is Web Deploy")]
        public bool IsWebDeploy { get; set; }

        [Display(Name = "Partial Update")]
        public bool PartialUpdate { get; set; }
    }
}
